package com.cyn.service.impl;

import com.cyn.dao.ProjectMapper;
import com.cyn.entity.Project;
import com.cyn.service.ProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProjectServiceImpl implements ProjectService {

    @Autowired
    ProjectMapper projectMapper;


    @Override
    public Project insert(Project project) {
        Integer id = projectMapper.insert(project);
        return project;
    }

    @Override
    public Project get(Long id) {
        Project re = projectMapper.get(id);
        return re;
    }

    @Override
    public List<Project> getList() {
        return projectMapper.getList(new Project());
    }

    @Override
    public Integer getListCount() {
        Integer count = projectMapper.getCount(new Project());
        return count;
    }
}
